<?php if( $tpl['_header'] ){ include($_CFG['DIR_ADMIN_TPL'].'header.html'); }?>


<?php if( $tpl['_body'] == 'list' ){ ?>

    <?php if( $tpl['_bodysub'] != 'query' ){?>
    <div class="listtable-div" id="listtable-dboptimize" onmouseover="ListTable.init(this.id,'modules/db/db_optimize.php','?act=list');">
        <div class="listtable-data" style="border-top:0;">
    <?php }?>

            <table class="listtable-table" onmouseover="TableAct.moveHiLight(this);TableAct.choiceHiLight(this);" style="border-bottom:0;">
            <tr>
                <th width="17%">数据表</th>
                <th width="14%">数据表备注</th>
                <th width="10%">数据表类型</th>
                <th width="11%">记录数</th>
                <th width="10%">数据量</th>
                <th width="11%">碎片</th>
                <th width="12%">字符集</th>
                <th width="15%">状态</th>
            </tr>
            <?php foreach( $tpl['all'] AS $i=>$r ){?>
            <tr align="center">
                <td><?php echo $r['name']; ?></td>
                <td><?php echo $r['comment']; ?></td>
                <td><?php echo $r['type']; ?></td>
                <td><?php echo $r['rows']; ?></td>
                <td><?php echo $r['size']; ?></td>
                <td><?php echo $r['chip'] > 0 ? f($r['chip'],'color') : $r['chip']; ?></td>
                <td><?php echo $r['charset']; ?></td>
                <td><?php echo $r['status']; ?></td>
            </tr>
            <?php }?>
            <tr align="center" style="color:#023A55;">
                <td style="background:#fbfdfd;border-bottom:0;"></td>
                <td style="background:#fbfdfd;border-bottom:0;"></td>
                <td style="background:#fbfdfd;border-bottom:0;"></td>
                <td style="background:#fbfdfd;border-bottom:0;"><?php echo $tpl['stat']['rows']; ?></td>
                <td style="background:#fbfdfd;border-bottom:0;"><?php echo $tpl['stat']['size']; ?></td>
                <td style="background:#fbfdfd;border-bottom:0;"><?php echo $tpl['stat']['chip'] > 0 ? f($tpl['stat']['chip'],'color') : $tpl['stat']['chip']; ?></td>
                <td style="background:#fbfdfd;border-bottom:0;"></td>
                <td style="background:#fbfdfd;border-bottom:0;"></td>
            </tr>
	        </table>

    <?php if( $tpl['_bodysub'] != 'query' ){?>
        </div>
    </div>
    <?php }?>


<?php } ?>